package com.jintoufs.dao.customer;

import com.jintoufs.domain.customer.CustomerResource;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface CustomerResourceMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(CustomerResource record);

    int insertSelective(CustomerResource record);

    CustomerResource selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(CustomerResource record);

    int updateByPrimaryKey(CustomerResource record);

    List<CustomerResource> selectByRole(Integer roleId);

    boolean isMenu(Map<String, Object> params);

    /**
     * 查询资源列表
     */
    List<CustomerResource> selectByParams(Map<String, Object> params);

    void deleteResourceByRole(Integer roleId);

    /**
     * 添加资源-角色关联信息
     */
    void saveRoleResource(Integer roleId, Integer resourceId);

    void deleteResourceById(@Param("id") Integer id);



}